import axios from 'axios';

// let base = 'http://10.159.13.7:8080/ckgl/api';
let base = 'http:///9tqnxi.natappfree.cc/ckgl/api';

export const requestLogin = params => { return axios.post(`${base}/login`, params).then(res => res.data); };

export const type1 = params => { return axios.get(`${base}/type`, { params: params }); };

export const insertCommodity = params => { return axios.get(`${base}/insert`, { params: params }); };

export const listpage = params => { return axios.get(`${base}/listpage`, { params: params }); };

export const listDelete = params => { return axios.get(`${base}/delete`, { params: params }); };

export const update = params => { return axios.get(`${base}/update`, { params: params }); };

export const getone = params => { return axios.get(`${base}/getone`, { params: params }); };

export const getstor = params => { return axios.get(`${base}/storage`, { params: params }); };

export const getType = params => { return axios.get(`${base}/addtype`, { params: params }); };

export const typepage = params => { return axios.get(`${base}/typepage`, { params: params }); };

export const deletetype = params => { return axios.get(`${base}/deletetype`, { params: params }); };

export const updatetype = params => { return axios.get(`${base}/updatetype`, { params: params }); };

export const typeone = params => { return axios.get(`${base}/typeone`, { params: params }); };

export const getcount = params => { return axios.get(`${base}/count`, { params: params }); };


// export const getUserListPage = params => { return axios.get(`${base}/user/listpage`, { params: params }); };

export const removeUser = params => { return axios.get(`${base}/user/remove`, { params: params }); };


export const batchRemoveUser = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };

export const editUser = params => { return axios.get(`${base}/user/edit`, { params: params }); };

export const addUser = params => { return axios.get(`${base}/user/add`, { params: params }); };